import Vue from 'vue'

import Cookies from 'js-cookie'

import Element from 'element-ui'
import './assets/styles/element-variables.scss'

import '@/assets/styles/index.scss' // global css
import '@/assets/styles/ruoyi.scss' // ruoyi css
import App from './App'
import store from './store'
import router from './router'
import dataV from '@jiaminghi/data-view';
import 'default-passive-events';
import 'element-ui/lib/theme-chalk/index.css';
// 引入全局css
import './assets/scss/style.scss';
import Icon from 'vue-awesome/components/Icon';
import 'vue-awesome/icons/chart-area.js';
import 'vue-awesome/icons/chart-bar.js';
import 'vue-awesome/icons/chart-line.js';
import 'vue-awesome/icons/align-left.js';

import { parseTime ,changeTwo,getWeekNumber,getRandomInt,getDatesRange,removeWeekends,getMonthDay,hoursSinceMidnight,getDayOfYear} from "@/utils/ruoyi";
// 分页组件
import Pagination from "@/components/Pagination";
// import echarts from 'echarts'
Vue.component('Pagination', Pagination)
Vue.prototype.parseTime = parseTime
Vue.prototype.changeTwo = changeTwo
Vue.prototype.getWeekNumber = getWeekNumber
Vue.prototype.getRandomInt = getRandomInt
Vue.prototype.getDatesRange = getDatesRange
Vue.prototype.removeWeekends = removeWeekends
Vue.prototype.getMonthDay = getMonthDay
Vue.prototype.hoursSinceMidnight = hoursSinceMidnight
Vue.prototype.getDayOfYear = getDayOfYear
Vue.use(dataV)
Vue.use(Element, {
  size: Cookies.get('size') || 'medium' // set element-ui default size
})
// Vue.prototype.$bus = new Vue()
Vue.config.productionTip = false
// 全局注册
Vue.component('icon', Icon);
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
